#include <stdio.h>

//能被4整除，不能被100整除 或 能被400整除 的是闰年
int del(int years) {
    if (years % 100 != 0 || years % 400 == 0) {
        return 1;
    } else {
        return 0;
    }
}

int main() {
    int num1_year, num2_year;
    printf("请输入年份范围:>");
    scanf("%d%d", &num1_year, &num2_year);
    int year = 0;
    int count = 0;
    int min = (num1_year < num2_year ? num1_year : num2_year);
    int max = (num1_year > num2_year ? num1_year : num2_year);
    for (year = min; year <= max; year++) {
        if (year % 4 == 0 && year % 100 != 0) {
            break;
        }
    }
    while (year <= max) {
        int True = del(year);
        if (True == 1) {
            count++;
            printf("%d\n", year);
        }
        year += 4;
    }
    printf("总数为:>%d\n", count);
    return 0;
}